package com.ia.bikerecife.core;
import java.io.FileNotFoundException;
import java.net.URL;

import org.aitools.programd.Core;
import org.aitools.programd.util.URLTools;

public class ProgramD {
	
	String bot = "askRecife";
	URL baseURL = null;
	URL propURL = null;
	Core core = null;
	
	public ProgramD(){
		try {
			baseURL = URLTools.createValidURL(System.getProperty("user.dir"));
			propURL = URLTools.createValidURL("conf/core.xml");
//			baseURL = URLTools.createValidURL("C:\\Users\\luizcajueiro\\Desktop\\Twitter\\");
//			propURL = URLTools.createValidURL("C:\\Users\\luizcajueiro\\Desktop\\Twitter\\conf\\core.xml");

			core = new Core(baseURL, propURL);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}
	
	public String askMe(String pergunta){
		return core.getResponse(pergunta, "user", bot);
	}
}
